﻿<!--
Project: ClipFlair (http://ClipFlair.codeplex.com)
Filename: MapWindow.xaml
Version: 20150625
-->

<clipflair:BaseWindow x:Class="ClipFlair.Windows.MapWindow"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  
  xmlns:utils="clr-namespace:System.Windows.Controls;assembly=Compatibility"
  xmlns:clipflair="clr-namespace:ClipFlair.Windows;assembly=ClipFlair.Windows.Base" 
  xmlns:map="clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl"
  xmlns:options="clr-namespace:ClipFlair.Windows.Options"                      
  mc:Ignorable="d"
  d:DesignWidth="490" d:DesignHeight="375"
  >

  <clipflair:BaseWindow.Resources>
    <ResourceDictionary>
      
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ClipFlair.Windows.Base;component/Themes/Generic.xaml" />
      </ResourceDictionary.MergedDictionaries>

      <utils:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
      
    </ResourceDictionary>
  </clipflair:BaseWindow.Resources>

  <!--<clipflair:BaseWindow.FrontContent>-->

  <!-- TODO: hiding Bing logo and Map data copyright, should check Bing license on this -->
  <map:Map Name="map"
           CredentialsProvider="Agym4sFGpihhA05O6X-xYPlLdYtUc95T16SPsZWTTS0ISkv89BfRw2pw06VC6Mep" 
           CopyrightVisibility="Collapsed"
           LogoVisibility="Collapsed"
           NavigationVisibility="{Binding NavigationVisible, Mode=TwoWay, Converter={StaticResource BooleanToVisibilityConverter}}"
           ScaleVisibility="{Binding ScaleVisible, Mode=TwoWay, Converter={StaticResource BooleanToVisibilityConverter}}"
           Culture="{Binding Culture, Mode=TwoWay}"
           ModeChanged="map_ModeChanged"
           Center="{Binding MapCenter, Mode=TwoWay}"
           ZoomLevel="{Binding MapZoom, Mode=TwoWay}"
           MouseLeftButtonDown="map_MouseLeftButtonDown"
           />
  <!-- UseInertia="{Binding Inertia, Mode=TwoWay}" -->
  
  <!--</clipflair:BaseWindow.FrontContent>-->

  <clipflair:BaseWindow.PropertyItems>

    <options:MapOptions x:Name="mapOptions" DataContext="{Binding}" /> <!-- uses our DataContext (the View) -->
  
  </clipflair:BaseWindow.PropertyItems>

</clipflair:BaseWindow>
